page.tsx 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. "use server";
  2. import { getServicesApi } from "@/api/customservice";
  3. import { Link } from "@/i18n/routing";
  4. import { getTranslations } from "next-intl/server";
  5. import Form from "../components/Form";
  6. import GoogleCom from "../components/GoogleCom";
  7. const Login = async () => {
  8. const t = await getTranslations("LoginPage");
  9. const services = await getServicesApi();
  10. console.log(`🚀🚀🚀🚀🚀-> in page.tsx on 11`, services);
  11. const defaultService = services?.filter((item) => item.register_show === 1);
  12. return (
  13. <>
  14. <GoogleCom />
  15. <Form type={"login"} />
  16. <div className={"text-center"}>
  17. <span className={"mr-[20px] text-[14px] text-[#fff]"}>{t("childTips")}</span>
  18. <span className={"iconfont icon-a-18 text-[red]"}></span>
  19. </div>
  20. <div
  21. className={`absolute bottom-[0.84rem] right-[0.12rem] z-50 flex w-[0.6944rem] flex-col items-center justify-center`}
  22. >
  23. {defaultService.map((item, index) => (
  24. <Link
  25. key={index}
  26. href={item.url}
  27. className={
  28. "flex h-[0.54rem] w-[0.54rem] items-center justify-center rounded-[50%]" +
  29. " bg-gradient-to-t from-[#ff611b] to-[#ffcf35]"
  30. }
  31. target={"_blank"}
  32. >
  33. <img
  34. className={"h-[0.3889rem] w-[0.3889rem] object-contain"}
  35. src={item.icon_url}
  36. alt={""}
  37. ></img>
  38. </Link>
  39. ))}
  40. </div>
  41. </>
  42. );
  43. };
  44. export default Login;